<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .demo{
            background-color:blueviolet;
            display:inline-block;
            border:5px solid yellowgreen 
        }
        .viewport{
            background-color: aquamarine;
            float:left;
        }
        .r{
            background-color: blueviolet;
            float:right;
        }
    </style>
</head>
<body>
    <div class="demo">这是一个边框</div>
    <br>
    <div class="viewport">aaaaaa</div>
    <div class="viewport">aaaaaa</div><div class="viewport">aaaaaa</div>
    <div class="viewport">aaaaaa</div>
    <div class="r">bbbbb</div>
    
    <div class="r">bbbbb</div>
    <div class="r">bbbbb</div>
    <div class="r">bbbbb</div>
    <div class="r">bbbbb</div>
</body>
</html>